<?php
/**
 * DonReY Framework 2012 :: Messages that the framework is able to output in English language. Contains errors messages and other text output, usually used for debugging.
 * They use the DRY\Template to output, so variables can be inserted in the text.
 * Applications are able to extend the list by including similar files (or even overwrite default messages)
 *
 * Feel free to translate them into other languages (and send me a copy at wavetrex@gmail.com, thanks)
 *
 * @author Wavetrex <wavetrex@gmail.com>
 * @link http://www.donrey.net/Documentation/Structure/core.html#debug
 * @license [GPL v3] http://www.gnu.org/licenses/gpl-3.0.html
 * @version 1.0.dev
 * @package DonReY
 * @subpackage core
 */
namespace DRY;

Water::$messages['default'] = array(
	// Default message for when a category is not specified or it doesn't exist in the $messages array
	'DefaultError'	=> "Unknown error encountered in file: {err.File} at line: {err.Line}, category: {err.Water.Category}, code: {err.Water.Code}",
	// Default title for the Crash page
	'CrashTitle'	=> "Unrecoverable Error !",
	// Error types translations
	'ErrorTypes'=> array(
		'EXC'	=> "Exception",
		'ERROR' => "Error",
		'WARN'	=> "Warning",
		'INFO'	=> "Notice"
	)
);

Water::$messages['core'] = array(
	core::EXC_UNKNOWN_ERROR			=> "Unknown Error",
	core::EXC_CONFIG_FILE_ERROR		=> "Unable to load configuration file {config_file} because: {reason}",
	core::EXC_AUTOLOAD_FILENOTFOUND => "core::Autoload failed to discover location of class {class}",
	core::EXC_AUTOLOAD_DENIEDLOAD	=> "core::Autoload was denied loading class {class}",
	core::EXC_EXTERNAL_LIB_MISSING	=> "core::Autoload could not find external library {class}",
	core::EXC_BAD_PATH_CONSTANT		=> "Attempting to use the path constant {constant} which does not exist",

	core::EXC_MODULE_NOT_FOUND			=> "Module \"{name}\", which is specified in CFG, doesn't actually exist",
	core::EXC_INVALID_MODULE_REFERENCED => "Invalid module alias \"{alias}\" referenced",
	core::EXC_MODULE_INITIALIZATION_FAIL=> "Failed to initialize module with alias \"{alias}\"",
	core::EXC_MODULE_DEPENDENCY_NOT_SET	=> "Attemping to use a dependency named \"{depkey}\", which does not exist",

	core::EXC_PLUGIN_METHOD_NOT_FOUND	=> "Method \"{method}\" not found in any loaded plugins",
	core::EXC_PLUGIN_METHOD_ALREADY_REGISTERED	=> "Method \"{method}\" was already registerd by plugin \"{plugin}\"",

	core::ERR_FILE_MISSING			=> "Missing file",
	core::ERR_INVALID_XML			=> "Invalid XML",
	core::ERR_INVALID_JSON			=> "Invalid JSON"
);

Water::$messages['debug'] = array(
	 0	=> "General error in module Debug"
);
Water::$messages['application'] = array(
	 0	=> "General error in module Application",
	// Module_Application::EXC_PATHS_NOTSET
	 1	=> "Required paths not set in config (controllers)",
	// Module_Application::EXC_CTRLPATH_MISSING
	 2	=> "Could not locate at least one valid path where controllers reside",
	// Module_Application::EXC_CTRL_NOTALLOWED
	 3	=> "Controller not allowed in configuration",
	// Module_Application::EXC_CTRL_CLASSNOTFOUND
	 4	=> "Could not find the class for controller",
	// Module_Application::EXC_NOROUTE_HANDLERS
	 5	=> "No controller list defined in configuration, unable to route URL to a controller",
	// Module_Application::EXC_ROUTE_NOTFOUND
	 6	=> "Unable to find a valid route for current URI, please check application configuration",
	// Module_Application::EXC_ROUTE_NOTASSIGNED_TO_CTRL
	 7	=> "Unable to find a controller that handles the route \"{found_route}\", please check application configuration",
	// Module_Application::EXC_CTRL_FORWARD_LOOP_TRAP
	 8	=> "More than 10 controller forwards detected, there is probably an error in controller forwarding",
	// Module_Application::EXC_CTRL_INSIDE_THROW
	 9  => "Internal error {err.Code} in controller \"{controller}\" with message"
);

Water::$messages['layout'] = array(
	 0	=> "General error in module Layout",
 	// Module_Layout::EXC_PATHS_NOTSET
 	 1	=> "Required paths not set in config (layouts, widgets)",
 	// Module_Layout::EXC_PATHS_MISSING
 	 2	=> "Could not locate at least one valid path where {what} reside",
	// Module_Layout::EXC_WIDGET_NOTALLOWED
	 4	=> "Widget \"{widget_name}\" not allowed in configuration",
	// Module_Layout::EXC_WIDGET_ID_NOTFOUND
 	 5	=> "Widget identifier \"{widget_identifier}\" not found in configuration",
	// Module_Layout::EXC_WIDGET_NOTFOUND
 	 6	=> "Widget \"{widget_name}\" doesn't exist",
 	// Module_Layout::EXC_WIDGET_INSIDE_THROW
 	 9	=> "Internal error in widget identifier \"{widget_identifier}\" with message \"{message}\""
);

Water::$messages['queryfactory'] = array(
	 0	=> "General error in module Queryfactory"
);

Water::$messages['template'] = array(
	 0	=> "General error in module Template",
 	// Module_Template::ERR_FILE_MISSING
 	 1	=> "Template file \"{filename}\" is missing"
);
Water::$messages['news'] = array(
 	// Module_News::EXC_ARTICLES_FEATURE_MISSING
 	 1	=> "Configuration error, \"articles\" feature must be configured",
 	// Module_News::EXC_FEATURE_NOT_ENABLED
 	 2	=> "Feature \"{feature}\" is not currently enabled"
);

Water::$messages['authentication.files'] =  array(
 	// credentials_Storage_Files::EXC_PATH_NOTSET
	 1	=> "Credentials storage path not set",
 	// credentials_Storage_Files::EXC_PATH_MISSING
	 2	=> "Credentials storage path {path} is missing",
 	// credentials_Storage_Files::EXC_FORMAT_NOT_SUPPORTED
	 3	=> "Credentials encoding format {format} is not currently supported"
);

Water::$messages['render'] = array(
 	// Module_Render::EXC_TRANSFORM_TYPE_NOT_DEFINED
	 1	=> "Render transform of type {type} not defined in configuration"
);

Water::$messages['structure'] = array(
	// \DRY\Module\Structure::EXC_STRUCTURE_TYPE_NOT_DEFINED
	 1	=> "Structure of type {type} not defined in configuration"
);
